package com.ctshk.rpc.order.goods.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ctshk.common.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author 姜斌文
 * @since 2021-04-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_order")
@ApiModel(value="Order对象", description="订单表")
public class Order extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单编号")
    private String orderNumber;

    @ApiModelProperty(value = "订单金额")
    private BigDecimal orderAmount;

    @ApiModelProperty(value = "销售方式：1：单品销售；2：打包銷售 （动态套票加入的商品）")
    private Integer saleType;

    @ApiModelProperty(value = "付款状态:1：待付款;2：已付款; 3:已取消")
    private Integer paymentStatus;

    @ApiModelProperty(value = "预订状态:0:- 1：确认预订;2：确认取消; 3：待确认 ")
    private Integer scheduledStatus;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "审批ID")
    private Long approvalId;

    @ApiModelProperty(value = "取消状态：审批状态： 0:- 1：审批中;2：审批通过；3：审批未通过")
    private Integer cancelStatus;

    @ApiModelProperty(value = "业务类型:1：商品；2：当地玩乐")
    private Integer businessType;

    @ApiModelProperty(value = "产品类型：1：人工录入")
    private Integer productType;

    @ApiModelProperty(value = "订单来源id：商城，小店，门店 （存取id)")
    private Long sourceId;

    @ApiModelProperty(value = "订单来源渠道：1:pc; 2:h5; 3:app")
    private Integer sourceChannel;

    @ApiModelProperty(value = "订单来源类型:1：商城；2：小店；3：门店")
    private Integer sourceType;

    @ApiModelProperty(value = "订单来源名称")
    private String sourceName;

    @ApiModelProperty(value = "销售用户id")
    private Long saleUserId;

    @ApiModelProperty(value = "销售用户名称")
    private String saleUserName;

    @ApiModelProperty(value = "下单用户id")
    private Long userId;

    @ApiModelProperty(value = "下单用户名称")
    private String userName;

    @ApiModelProperty(value = "运费金额-運費模板")
    private BigDecimal freightAmount;

    @ApiModelProperty(value = "税费金额")
    private BigDecimal taxAmount;

    @ApiModelProperty(value = "配送方式：用户下单时选择-1：物流配送(订单收货人信息表); 2：门店自提（订单提货人信息表）")
    private Integer deliveryMode;

    @ApiModelProperty(value = "订单备注")
    private String orderNotes;

    @ApiModelProperty(value = "订单状态:1：待付款; 2：待发货; 3：待收货; 4：已完成; 5：已取消; 6:待提货; 7:已发货; 8:未付款，已取消; 9:待处理; 10:待退款； 11：已退款")
    private Integer orderStatus;

    @ApiModelProperty(value = "订单核销码")
    private String orderWriteOffNumber;

    @ApiModelProperty(value = "核销状态:1：待核销; 2：已核销")
    private Integer writeOffStatus;

    @ApiModelProperty(value = "核销码核对时间")
    private LocalDateTime writeOffTime;

    @ApiModelProperty(value = "推广码id")
    private Long promotionCodeId;

    @ApiModelProperty(value = "推广码")
    private String promotionCode;

    @ApiModelProperty(value = "推广码所属商品id（哪个商品使用的推广码）")
    private Long promotionCodeCommodityId;

    @ApiModelProperty(value = "创建人")
    private Long createId;

    @ApiModelProperty(value = "修改人")
    private Long modifiedId;

    @ApiModelProperty(value = "删除标识")
    private Integer isDeleted;

    @ApiModelProperty(value = "查询号码")
    private String searchCode;

    @ApiModelProperty(value = "支付方式")
    private String payMethod;

    @ApiModelProperty(value = "小店id")
    private Long shopId;

    @ApiModelProperty(value = "收据抬头")
    private String ReceiptUp;

    @ApiModelProperty(value = "付款到期时间")
    private LocalDateTime payExpireDate;

    @ApiModelProperty(value = "订单来源 1 散客 2 大客户")
    private Integer orderSourceType;

    @ApiModelProperty(value = "大客户ID")
    private Long bigClientId;

    @ApiModelProperty(value = "大客户名称")
    private String bigClientName;

    @ApiModelProperty(value = "退改手续费类型（1：加数值  2：百分比）")
    private Integer refundServiceChargeType;

    @ApiModelProperty(value = "退改手续费")
    private BigDecimal refundServiceCharge;
}
